package com.jichangxiu.generator.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.jichangxiu.common.entity.po.BaseEntity;
import com.jichangxiu.generator.entity.bo.GenColumnBo;
import com.jichangxiu.generator.entity.vo.GenColumnVo;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * GenColumn: gen_column 生成列表
 *
 * @author JiChangXiu
 * @create 2024-06-30 13:31:02
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("gen_column")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AutoMappers({
        @AutoMapper(target = GenColumnBo.class, reverseConvertGenerate = false),
        @AutoMapper(target = GenColumnVo.class, reverseConvertGenerate = false)
})
public class GenColumn extends BaseEntity {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 行ID
     */
    @TableField(value = "row_id")
    private String rowId;

    /**
     * 列名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 列描述
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 列类型
     */
    @TableField(value = "column_type")
    private String columnType;

    /**
     * JAVA类型
     */
    @TableField(value = "java_type")
    private String javaType;

    /**
     * JAVA字段名
     */
    @TableField(value = "java_field")
    private String javaField;

    /**
     * 大写JAVA字段名
     */
    @TableField(value = "big_java_field")
    private String bigJavaField;

    /**
     * 是否主键
     */
    @TableField(value = "primary")
    private Boolean primary;

    /**
     * 是否自增
     */
    @TableField(value = "increment")
    private Boolean increment;

    /**
     * 是否必填
     */
    @TableField(value = "required")
    private Boolean required;

    /**
     * 是否唯一
     */
    @TableField(value = "unique")
    private Boolean unique;

    /**
     * 是否为插入字段
     */
    @TableField(value = "insert")
    private Boolean insert;

    /**
     * 是否为编辑字段
     */
    @TableField(value = "edit")
    private Boolean edit;

    /**
     * 是否为列表字段
     */
    @TableField(value = "list")
    private Boolean list;

    /**
     * 是否为查询字段
     */
    @TableField(value = "query")
    private Boolean query;

    /**
     * 查询方式
     */
    @TableField(value = "query_type")
    private String queryType;

    /**
     * 显示类型
     */
    @TableField(value = "html_type")
    private String htmlType;

    /**
     * 布局类型
     */
    @TableField(value = "layout_type")
    private String layoutType;

    /**
     * 字典类型标识
     */
    @TableField(value = "dict_code")
    private String dictCode;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private String tenantId;

    /**
     * 顺序
     */
    @TableField(value = "sort")
    private BigDecimal sort;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(value = "deleted")
    private Long deleted;

}